<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'accountProject.label', default: 'AccountProject')}"/>
    <title>项目详情</title>
</head>

<body>
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right navFloatRight">
                <ol class="hbreadcrumb breadcrumb">
                    <li>
                        <span>CINDATA PLS</span>
                    </li>
                    <li>
                        <g:link controller="account" action="externalAccountShow" params="[id: accountProject?.account?.id, code: params?.code]"><span>机构详情</span></g:link>
                    </li>
                    <li class="active">
                        <span>项目详情</span>
                    </li>
                </ol>
            </div>
            <h2 class="font-light m-b-xs">
                项目详情
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">
    <div class="row">
        <g:if test="${flash.message}">
            <div class="message alert alert-info" role="status">${flash.message}
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
            </div>
        </g:if>
        <div class="hpanel hred contact-panel">
            <div class="panel-heading">
                <div class="panel-tools">
                    <g:link class="btn btn-info btn-xs" action="edit" resource="${this.accountProject}"><i class="fa fa-edit"></i>编辑</g:link>
                </div>
                项目详情
            </div>

            <div class="panel-body">
                <h4>
                    ${this.accountProject?.name}
                </h4>
                <div class="col-md-2">
                    <strong>
                        ${this.accountProject?.city?.name} ${this.accountProject?.address}
                    </strong>
                </div>
            </div>

            <div class="panel-footer contact-footer">
                <div class="row">

                    <div class="col-md-2 border-right">
                        <div class="contact-stat">
                            <span>预售证编号</span>
                            <strong>${this.accountProject?.preSalePermitNumber}</strong>
                        </div>
                    </div>

                    <div class="col-md-2 border-right">
                        <div class="contact-stat">
                            <span>工作流</span>
                            <strong>${this.accountProject?.workflow?.name}</strong>
                        </div>
                    </div>

                    <div class="col-md-2 border-right">
                        <div class="contact-stat">
                            <span>入围状态</span>
                            <strong>${this.accountProject?.entryStatus}</strong>
                        </div>
                    </div>

                    <div class="col-md-2 border-right">
                        <div class="contact-stat">
                            <span>建筑类别</span>
                            <strong>${this.accountProject?.buildingstructure}</strong>
                        </div>
                    </div>

                    <div class="col-md-2 border-right">
                        <div class="contact-stat">
                            <span>交房时间</span>
                            <strong><g:formatDate date="${this.accountProject?.deliveryDate}" format="yyyy-MM-dd"></g:formatDate></strong>
                        </div>
                    </div>

                    <div class="col-md-2 border-right">
                        <div class="contact-stat">
                            <span>竣工验收</span>
                            <strong><g:formatDate date="${this.accountProject?.completionDate}" format="yyyy-MM-dd"></g:formatDate></strong>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    %{--楼盘列表--}%
    <div class="row">
        <div class="hpanel hyellow collapsed">
            <div class="panel-heading">
                <div class="panel-tools">
                    <g:link class="btn btn-info btn-xs" controller="accountProjectBuilding" action="create" params="[project: this.accountProject?.id]">
                        <i class="fa fa-plus"></i>新增
                    </g:link>
                    <a class="showhide">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                </div>
                楼盘列表
            </div>

            <div class="panel-body no-padding" style="display: block">
                <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover text-center">
                        <thead>
                        <tr>
                            <g:sortableColumn property="name" title="楼盘名称"/>
                            <g:sortableColumn property="address" title="楼盘地址"/>
                            <g:sortableColumn property="coveringArea" title="占地面积（平方米)"/>
                            <g:sortableColumn property="totalBuildingArea" title="总建筑面积（平方米)"/>
                            <g:sortableColumn property="certificateNumber" title="资质证书编号"/>
                            <g:sortableColumn property="buildingType" title="用途性质"/>
                        </tr>
                        </thead>
                        <tbody>
                        <g:each in="${com.cindata.AccountProjectBuilding.findAllByProject(this.accountProject, [sort:'modifiedDate', order: 'desc'])}">
                            <tr class="text-center">
                                <td><g:link style="color: #3498DB" controller="accountProjectBuilding" action="show" id="${it?.id}">${it?.name}</g:link></td>
                                <td>${it?.address}</td>
                                <td>${it?.coveringArea}</td>
                                <td>${it?.totalBuildingArea}</td>
                                <td>${it?.certificateNumber}</td>
                                <td>${it?.buildingType?.name}</td>
                            </tr>
                        </g:each>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
